import { List } from "../model/base/list";
import { ListSearch } from "../model/base/list_search";

export class Loglist extends List<interfaceLog> {
    constructor() {
        super()
        this.baseUrl = "/admin/base/sys/log"
        this.title = "记录列表"
        this.labels = {
            id: { prop: "id", label: "ID", type: 'text', width: 80 },
            userId: { prop: "userId", label: "用户ID", type: 'text' },
            name: { prop: "name", label: "姓名", type: 'text' },
            action: { prop: "action", label: "行为", type: 'text' },
            ip: { prop: "ip", label: "ip", type: 'text' },
            params: { prop: "params", label: "参数", type: 'json', overflow: true },
            createTime: { prop: "createTime", label: "创建时间", overflow: true, type: 'text' }
        }
    }
}
export class LogSearch extends ListSearch<interfaceLogSearch> {
    constructor() {
        super()
        this.labels = {
            keyWord: {
                prop: "keyWord",
                label: "操作人",
                type: 'text',
                clearable: true,
                placeholder: "搜索请求地址、用户昵称、IP"
            }
        }
    }
}
